projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6837e80
)
cssstaticstyle: Make set_value (transfer-full)
author
Timm Bäder
<mail@baedert.org>
Sat, 17 Aug 2019 17:08:16 +0000
(19:08 +0200)
committer
Timm Bäder
<mail@baedert.org>
Mon, 9 Sep 2019 15:36:23 +0000
(17:36 +0200)
We only call this in one place and we can avoid a ref + unref pair this
way.
gtk/gtkcssstaticstyle.c
patch
|
blob
|
history
diff --git
a/gtk/gtkcssstaticstyle.c
b/gtk/gtkcssstaticstyle.c
index ef6ac593b6efefa43fac7e753e1b49547aa198f3..7f7eba14abaa2585885767050483ddc5936a2884 100644
(file)
--- a/
gtk/gtkcssstaticstyle.c
+++ b/
gtk/gtkcssstaticstyle.c
@@
-115,7
+115,8
@@
gtk_css_static_style_set_value (GtkCssStaticStyle *style,
{
if (style->values[id])
_gtk_css_value_unref (style->values[id]);
- style->values[id] = _gtk_css_value_ref (value);
+
+ style->values[id] = value;
if (style->sections && style->sections->len > id && g_ptr_array_index (style->sections, id))
{
@@
-228,8
+229,8
@@
gtk_css_static_style_compute_value (GtkCssStaticStyle *style,
value = _gtk_css_value_compute (specified, id, provider, (GtkCssStyle *)style, parent_style);
gtk_css_static_style_set_value (style, id, value, section);
+ value = NULL;
- _gtk_css_value_unref (value);
_gtk_css_value_unref (specified);
}